import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

import common.CommonUtil;
import java.text.DateFormat;

import com.sun.jmx.snmp.Timestamp;
import com.sybase.jdbc3.tds.a;

public class test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自动生成方法存根
		TimeZone timezoneCH = TimeZone.getTimeZone("Asia/Shanghai");
		int y, m, d, h, mi, s;
		Calendar cal = Calendar.getInstance();
		cal.setTimeZone(timezoneCH);
		System.out.println(cal.getTime());
		System.out.println(cal.getTimeInMillis());
		System.out.println(System.currentTimeMillis());
		System.out.println(cal.getTimeInMillis());
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		System.out.println(sdf.format(cal.getTime()));
		System.out.println(CommonUtil.getDateTimeStr());
		System.out.println(CommonUtil.getDateStr().toString());
		
		
		
		DateFormat dateFormatterChina = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);//格式化输出
		TimeZone timeZoneChina = TimeZone.getTimeZone("Asia/Shanghai");//获取时区
		dateFormatterChina.setTimeZone(timeZoneChina);//设置系统时区
		//Date curDate = new Date();//获取系统时间
		
		System.out.println(CommonUtil.getDateTime());
		System.out.println(CommonUtil.getDate());
		System.out.println(CommonUtil.getDateTimeStr());
		System.out.println(CommonUtil.getDateStr());
		System.out.println("---");
//		Date curDate = new Date("2011-01-01");
		


	}

}
